package com.letoken.platform.repo.app.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Data
@TableName("chinas")
@ApiModel(value = "chinas对象", description = "省市县数据表")
public class Chinas extends Model<Chinas> {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 区域代码
     */
    @ApiModelProperty("区域代码")
    private Long code;

    /**
     * 名称
     */
    @ApiModelProperty("名称")
    private String name;

    /**
     * Pid
     */
    @ApiModelProperty("Pid")
    private Long pid;

    /**
     * 级别1省、2市、3县区
     */
    @ApiModelProperty("级别1省、2市、3县区")
    private String level;

    /*
     *  城市
     */
    @ApiModelProperty("城市")
    @TableField(exist = false)
    private List<Chinas> cityList;

    /*
     *   县区
     */
    @ApiModelProperty("县区")
    @TableField(exist = false)
    private List<Chinas> areaList;


    @TableField(exist = false)
    private List<Chinas> children;

}
